package com.smvc.handlers;

import java.util.Locale;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ResourceBundleMessageSource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class LanController {
	
	@Autowired
	private ResourceBundleMessageSource messageSource;
	
	@RequestMapping("dologin")
	public String toLogin(Locale locale){
		String uname = messageSource.getMessage("user.name", null, locale);
		System.out.println(uname);
		return "redirect:/index.jsp";
	}
}
